package com.py.ledger.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.py.ledger.mapper.InventoryDetailsMapper;
import com.py.ledger.domain.InventoryDetails;
import com.py.ledger.service.IInventoryDetailsService;

/**
 * 库存预警Service业务层处理
 * 
 * @author he
 * @date 2024-11-29
 */
@Service
public class InventoryDetailsServiceImpl implements IInventoryDetailsService 
{
    @Autowired
    private InventoryDetailsMapper inventoryDetailsMapper;


    /**
     * 查询库存预警高于上限和低于下限
     * @return
     */
    @Override
    public List<InventoryDetails> selectLedgerDetail() {
        String content="";

        return inventoryDetailsMapper.selectLedgerDetail();
    }

    /**
     * 查询库存预警
     * 
     * @param inventoryQueryId 库存预警主键
     * @return 库存预警
     */
    @Override
    public InventoryDetails selectInventoryDetailsByInventoryQueryId(Long inventoryQueryId)
    {
        return inventoryDetailsMapper.selectInventoryDetailsByInventoryQueryId(inventoryQueryId);
    }

    /**
     * 查询库存预警列表
     * 
     * @param inventoryDetails 库存预警
     * @return 库存预警
     */
    @Override
    public List<InventoryDetails> selectInventoryDetailsList(InventoryDetails inventoryDetails)
    {
        return inventoryDetailsMapper.selectInventoryDetailsList(inventoryDetails);
    }

    /**
     * 新增库存预警
     * 
     * @param inventoryDetails 库存预警
     * @return 结果
     */
    @Override
    public int insertInventoryDetails(InventoryDetails inventoryDetails)
    {
        return inventoryDetailsMapper.insertInventoryDetails(inventoryDetails);
    }

    /**
     * 修改库存预警
     * 
     * @param inventoryDetails 库存预警
     * @return 结果
     */
    @Override
    public int updateInventoryDetails(InventoryDetails inventoryDetails)
    {
        return inventoryDetailsMapper.updateInventoryDetails(inventoryDetails);
    }

    /**
     * 批量删除库存预警
     * 
     * @param inventoryQueryIds 需要删除的库存预警主键
     * @return 结果
     */
    @Override
    public int deleteInventoryDetailsByInventoryQueryIds(Long[] inventoryQueryIds)
    {
        return inventoryDetailsMapper.deleteInventoryDetailsByInventoryQueryIds(inventoryQueryIds);
    }

    /**
     * 删除库存预警信息
     * 
     * @param inventoryQueryId 库存预警主键
     * @return 结果
     */
    @Override
    public int deleteInventoryDetailsByInventoryQueryId(Long inventoryQueryId)
    {
        return inventoryDetailsMapper.deleteInventoryDetailsByInventoryQueryId(inventoryQueryId);
    }
}
